import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

public class Main {
	public static void main(String[] args) {
		String fileName = args[0];
		FindViewUtils.findView(fileName);
		
		File file = new File("D:/generatedCode.txt");
		file.setWritable(true);
		try {
			FileWriter writer = new FileWriter(file);
			writer.write(FindViewUtils.getViewAnnotion(fileName) + "\n" + 
						FindViewUtils.findView(fileName));
			writer.flush();
			System.out.println("fuck over");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		
	}
}
